package DaoTest;

import helloworld.application;
import helloworld.dao.ParkingLotDao;
import helloworld.model.Parking_lot;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.SpringApplicationConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;

/**
 * Created by admin on 2017/3/4.
 */
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(application.class)
public class ParkingLotDaotest {

    @Autowired
    ParkingLotDao parkingLotDao;
    @Test
    public void test()
    {
        Parking_lot parking_lot=new Parking_lot();
        parking_lot.setKind("door");
        parking_lot.setLocation("sb");
        parking_lot.setName("sb");
        parking_lot.setNow_num(50);
        parking_lot.setSum_num(500);
        parking_lot.setFlag("open");
        parking_lot=parkingLotDao.save(parking_lot);
        System.out.println("fuck you");
    }
}
